import { createSSRApp } from 'vue'
import TabBar from '@P/Tabbar/index.vue'
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import uviewPlus from 'uview-plus'
import App from './App.vue'
import store from './store/index'
import weiXinShare from '@/mixins/WeiXinShare'

export function createApp() {
  const app = createSSRApp(App)
      .use(store)
  app.use(uviewPlus)
  app.component('TabBar', TabBar)

  // 全局混入微信分享
  app.mixin(weiXinShare)

  return {
    app,
  }
}
